package cn.fairy.controller;

import cn.fairy.springBoot.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Value("${server.port}")
    private Long ip;

    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable Long id){
        //通过id  到数据库查询指定的用户的信息
        return User.builder().id(id).name("jj").desc("我叫吉吉" + ip).build();
    }
}
